@echo off
echo Starting Fire Detection Client...
echo 正在启动火灾检测客户端...

cd /d "D:\code\DT_project_brandnew\FireDetection_backend"

echo Checking Python environment...
echo 检查Python环境...

python --version
if %errorlevel% neq 0 (
    echo Python is not installed or not in PATH!
    echo Python未安装或未添加到PATH环境变量！
    pause
    exit /b 1
)

echo Installing required packages...
echo 安装所需的Python包...

pip install opencv-python

echo Starting Fire Detection Client...
echo 正在启动火灾检测客户端...
echo.
echo This client will:
echo 此客户端将：
echo - Connect to the socket server / 连接到Socket服务器
echo - Capture video from camera / 从摄像头捕获视频
echo - Send video frames to server / 发送视频帧到服务器
echo - Handle reconnection automatically / 自动处理重连
echo.
echo Make sure the server is running first!
echo 请确保服务器已先启动！
echo.

python client.py --host localhost --port 5000 --camera 0

pause
